/*
 * FileName: decorator.cc
 * Author: 李波(Edwin Lee)
 * Date: 2024-07-16 23:05:39
 * Version: 1.0
 * Description: 装饰者类定义：动态的将新功能附加到对象上。在对象功能扩展方面，它比继承更有弹性,装饰器类和代理类有点相似。
 */
#include <iostream>
using namespace std;

class Car 
{
public:
	virtual void show() = 0;
};

class Bmw:public Car
{
public:
	void show()
	{
		cout<<"这是一辆BMW汽车，配置有:基本配置"<<endl;
	}
};

class Audi:public Car
{
public:
	void show()
	{
		cout<<"这是一辆Audi汽车，配置有:基本配置"<<endl;
	}
};

class Benz:public Car
{
public:
	void show()
	{
		cout<<"这是一辆Benz汽车，配置有:基本配置"<<endl;
	}
};

//装饰器的基类
class CarDecorator:public Car 
{
public:
	CarDecorator(Car* p):pCar(p){}
private:
	Car* pCar;
};

class ConcreteDecorator01:public CarDecorator
{
public:
	ConcreteDecorator01(Car* p):pCar(p){}
};
int main()
{
	return 0;
}
